-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix memory leak of grpc resolver #4490
base: master
Are you sure you want to change the base?
Conversation
3d5bca9
to
d8c16f6
Compare
c, exists := r.getCluster(endpoints) | ||
// if not exists, return. | ||
if !exists { | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If not exist, getCluster will create a cluster and save it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I have considered this issue originally. I have written a new method to obtain the cluster, but usually the cluster has already been created when the Monitor is called first, so I deleted this method. To take a step back, generally speaking, when we use etcd, the endpoints are often the same, so even if a new cluster is created, it will have little impact.
Will be merged in v1.8.0. This PR uses slices package from go1.21, and we'll upgrade to this go version in v1.8.0. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
|
Fix memory leak issue
There are two situations: